﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="WebForm1.aspx.vb" Inherits="travel.WebForm1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">

    <asp:PlaceHolder ID="PlaceHolder1" runat="server">
        Administrator content to go here
    </asp:PlaceHolder>

    <p>
        &nbsp;</p>
    <p>
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataSourceID="TagDataSource">
            <Columns>
                <asp:HyperLinkField DataNavigateUrlFields="Tag" DataNavigateUrlFormatString="HotelsByTag.aspx?Tag={0}" DataTextField="Tag" HeaderText="Tag" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="TagDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:TravelConnectionString %>" ProviderName="<%$ ConnectionStrings:TravelConnectionString.ProviderName %>" SelectCommand="SELECT [Tag] FROM [Tags] ORDER BY [Tag]"></asp:SqlDataSource>
    </p>
    <p>
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    </p>
    <p>
        <asp:Button ID="Button1" runat="server" Text="Button" />
    </p>
    <p>
        <br />
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"  DataKeyNames="ID" AllowSorting="True" >
            <Columns>
                <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True" SortExpression="ID" />
                <asp:HyperLinkField DataNavigateUrlFields="HotelUrl" DataNavigateUrlFormatString="{0}" DataTextField="HotelName" HeaderText="Hotel Name" />
                <asp:TemplateField HeaderText="Stars">
                    <ItemTemplate><h1><%# getStars(Eval("StarRating"))%></h1></ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="Location" HeaderText="Location" SortExpression="Location" />
                <asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description">
                <ControlStyle CssClass="hotelcolumn" />
                </asp:BoundField>
                <asp:ImageField DataImageUrlField="HotelPicture" HeaderText="Picture">
                    <ControlStyle BorderColor="#FF3300" BorderStyle="Double" CssClass="hotelimage" />
                </asp:ImageField>
                <asp:HyperLinkField DataNavigateUrlFields="ID" DataNavigateUrlFormatString="Webform2.aspx?ID={0}" HeaderText="More Detail" Text="Detail" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlTravelDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:TravelConnectionString %>" ProviderName="<%$ ConnectionStrings:TravelConnectionString.ProviderName %>" SelectCommand="SELECT * FROM [Hotels] WHERE ([Location] = ?)">
            <SelectParameters>
                <asp:ControlParameter ControlID="TextBox1" Name="Location" PropertyName="Text" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
    </p>
</asp:Content>
